<script setup lang="ts">
import {useRoute} from "vue-router";
import {onMounted, ref} from "vue";
import request from "@/api/index.ts";
import  * as qs from 'qs'
import UsercordList from "@/components/UsercordList.vue";
const route = useRoute();
const TagList = route.query.activeIds;

const UseList = ref([])

const getUserList =  () => {
   request.get('/user/searchByTags',{
    params:{
      tagNameList:TagList
    },
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false });
    }
  }).then((res)=>{

    const result = res.data.data
     UseList.value = result;

  }).catch((err)=>{

  })
}

onMounted(()=>{
  getUserList();
})
</script>

<template>
  <UsercordList :UseList="UseList" />
</template>

<style scoped>

</style>